package com.rboat.blog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.blog.mapper.BlogMasterMapper;
import com.rboat.blog.domain.BlogMaster;
import com.rboat.blog.service.IBlogMasterService;
import com.rboat.common.core.text.Convert;

/**
 * 博主Service业务层处理
 * 
 * @author rboat
 * @date 2019-11-05
 */
@Service
public class BlogMasterServiceImpl implements IBlogMasterService 
{
    @Autowired
    private BlogMasterMapper blogMasterMapper;

    /**
     * 查询博主
     * 
     * @param id 博主ID
     * @return 博主
     */
    @Override
    public BlogMaster selectBlogMasterById(String id)
    {
        return blogMasterMapper.selectBlogMasterById(id);
    }

    /**
     * 查询博主列表
     * 
     * @param blogMaster 博主
     * @return 博主
     */
    @Override
    public List<BlogMaster> selectBlogMasterList(BlogMaster blogMaster)
    {
        return blogMasterMapper.selectBlogMasterList(blogMaster);
    }

    /**
     * 新增博主
     * 
     * @param blogMaster 博主
     * @return 结果
     */
    @Override
    public int insertBlogMaster(BlogMaster blogMaster)
    {
        return blogMasterMapper.insertBlogMaster(blogMaster);
    }

    /**
     * 修改博主
     * 
     * @param blogMaster 博主
     * @return 结果
     */
    @Override
    public int updateBlogMaster(BlogMaster blogMaster)
    {
        return blogMasterMapper.updateBlogMaster(blogMaster);
    }

    /**
     * 删除博主对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBlogMasterByIds(String ids)
    {
        return blogMasterMapper.deleteBlogMasterByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除博主信息
     * 
     * @param id 博主ID
     * @return 结果
     */
    @Override
    public int deleteBlogMasterById(String id)
    {
        return blogMasterMapper.deleteBlogMasterById(id);
    }
}
